<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:a="http://richfaces.org/a4j"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:rg="http://www.ruijie.com.cn/faces/ui"
	xmlns:c="http://java.sun.com/jstl/core"
	template="/layout/contentLayout.xhtml">

	<ui:param name="param_pageTitle"
		value="#{messages.luyuan_crm_menu_order}" />
	<ui:param name="param_navigationUrl"
		value="/luyuan/sale/layout/navigationSale.jsf" />

	<ui:define name="road">
		<span>销售记录</span>
	</ui:define>

	<!-- content -->
	<ui:define name="content">
		<rg:areaPanel>
			<h:form>
				<rg:areaPanel type="searchPanel"  style="margin: 10px 0;" >
					<rg:fieldSet column="auto">
						<rg:inputText value="#{orderSaleManagerAction.uuid}" label="订单号" />
						
						<rg:inputText id="saleman" labelStyle="width:80px;" label="制单人"
							value="#{orderSaleManagerAction.saleman.userName}" />

						<rg:calendar value="#{orderSaleManagerAction.startDate}" labelStyle="width:80px;" label="开始日期" 
							datePattern="yyyy-MM-dd" showApplyButton="false" />
						<rg:calendar value="#{orderSaleManagerAction.endDate}"
							label="结束日期" labelStyle="width:80px;" datePattern="yyyy-MM-dd"
							showApplyButton="false" />
						<h:commandButton styleClass="button"
							value="#{messages.luyuan_crm_query}" />
					</rg:fieldSet>
				</rg:areaPanel>

				<rg:titlePanel headerTitle="销售记录"
					needButton="true" readonly="false">

					<rg:table id="orderTable" value="#{orderSaleManagerAction.orderTableModel}"
						var="item">
						<rg:column property="id" title="订单号" />
						<rg:column property="orderType" title="订单类型"
							converter="#{orderTypeConverter}" />
						<rg:column property="orderStatus" title="订单状态"
							converter="#{orderStatusConverter}" />
						<rg:column property="saleman.userName" title="制单人" />
						<rg:column property="customer.name" title="购买会员" />
						<rg:column property="amount" title="成交额" />
						<rg:column type="oper" title="#{messages.luyuan_crm_operator}">
							<ul class="links">
								<li><a
									href="#{ctx}/luyuan/sale/orderViewForSaleManager.jsf?id=#{item.id}"
									class="button larger">详细订单</a></li>
							</ul>
						</rg:column>
					</rg:table>
				</rg:titlePanel>
			</h:form>
		</rg:areaPanel>
	</ui:define>
</ui:composition>